*********************************************************************************																			   *
*			Sir! I'd Rather Go to School Sir!			*
*										*
*				Mahdi Majbouri					*
*										*
*				Documentation					*
*										*
*				2-22-2018					*
*										*
*********************************************************************************

** How to get the data
The data used in the study entitled "Sir! I'd Rather Go to School, Sir!" by Mahdi 
Majbouri is the harmonized Iranian 2011 2% census sample. It is publicly available
at IPUMS International website at: https://international.ipums.org/international/
To get the data, one needs an account with IPUMS International. The following 
harmonized variables are required for this study:

SERIAL
PERNUM
SEX
AGE
RELATE
RELATED
EDATTAIN
EDATTAIND
MOMLOC
CHBORN
OCC

After you download the data in DAT format, you need to use the STATA do file that 
comes with it to convert DAT into Stata format. Save the resulting Stata data file 
in a file called "data.dta". This data file is not included in this set because I 
do not have the permission to share it online. It should be requested by any 
interested party directly from IPUMS International.

We use "data.dta" to prepare the two data files used to produce the results. Those 
final data files are census11-all.dta and census20-28.dta and are included in this 
package. They are generated by the first Stata do file: 
"01 Data Preparation & Table A1.do" 


** Generating the Results
The first Stata do file to run is "01 Data Preparation & Table A1.do", which prepares
the two final data files used to generate the results in this study: 
1) census11-all.dta and 2) census20-28.dta

These two data files are already included in the package. So, one does not need to 
execute this file if they do not get the original data from IPUMS International.
The remaining do files are named after each table/figure. They use these two data
files to produce all the results. One can execute them to produce the tables.

NOTE: MOST CODE FILES SAVE THE REGRESSION RESULTS IN CSV
FILES. SOME MACHINES COULD BE SO FAST THAT THEY REQUEST TO APPEND THE RESULTS TO 
A CSV FILE BEFORE THE RESULTS OF THE PREVIOUS REGRESSION IS PROPERLY SAVED ON THE
HARD DRIVE. SO, THE MACHINE MAY GENERATE AN ERROR MESSAGE IN THE MIDDLE OF EXECUTION.
THIS IS NORMAL. IN SUCH A CASE, EXECUTE THE DO FILE PART-BY-PART RATHER THAN IN ONE
GO.

Here are the do files in this package:
- 02 Figure 1.do
- 03 Table 1.do
- 04 Table 2.do
- 05 Table 3.do
- 06 Table 4.do
- 07 Figure A1.do
- 08 Figure A2-A5.do
- 09 Table A2.do
- 10 Table A3.do
- 11 Table A4.do
- 12 Table B1.do
- 13 Table B2.do
- 14 Table B3.do
- 15 Table B4.do
- 16 Table B5.do

Note that Table A1 is produced by "01 Data Preparation & Table A1". Table B2 contains
the average wage for each job category. The do file to produce this table, 
"13 Table B2.do", needs a different dataset, Household Income and Expenditure Survey 
(HIES), that cannot be included in this package as it is not publicly available. But 
this is not an issue as none of the results for average wages are statistically 
significant anyway (see Tables B3-B5). 




*********************************************************************************
*********************************  THE END **************************************
*********************************************************************************